﻿(function() {

var message = {
};

message.FindImage = chrome.i18n.getMessage("FindImage");

chrome.contextMenus.create(
	{
		"type": "normal",
		"title": message.FindImage,
		"contexts": [ "image" ],
		"onclick": function(info, tab) {
			// alert(info.srcUrl);
			var url = sprintf("http://www.google.com/searchbyimage?image_url=%s&hl=en-US&lr=lang_en-US&image_content=&filename=&num=10&newwindow=1&safe=strict&bih=332&biw=1280", info.srcUrl);
			chrome.tabs.create({ "url": url, "selected": true });
		}
	}, 
	function() {
	}
);

})();
